package com.htgd.gardenexpo.controller;


import com.github.pagehelper.PageInfo;
import com.htgd.gardenexpo.entity.CommonResult;
import com.htgd.gardenexpo.entity.GeConCompetitionSports;
import com.htgd.gardenexpo.entity.GeConPortraitRules;
import com.htgd.gardenexpo.entity.GeConSocialTopics;
import com.htgd.gardenexpo.page.SocialContentQuery;
import com.htgd.gardenexpo.service.IGeConPortraitRulesService;
import com.htgd.gardenexpo.vo.GeConCompetitionSportsVO;
import com.htgd.gardenexpo.vo.GeConPortraitRulesVO;
import com.htgd.gardenexpo.vo.GeConSocialContentVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 画像规则 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-10-10
 */
@RestController
@RequestMapping("/api/portraitRules")
@Api(tags = "画像规则")
public class GeConPortraitRulesController {

    @Autowired
    private IGeConPortraitRulesService geConPortraitRulesService;

    @PostMapping(value = "/edit")
    @ApiOperation("编辑")
    public CommonResult edit(@RequestBody GeConPortraitRules geConPortraitRules) {
        geConPortraitRulesService.updateById(geConPortraitRules);
        return CommonResult.success("修改成功");
    }

    @GetMapping(value = "/details")
    @ApiOperation("详情")
    public CommonResult<GeConPortraitRules> details(String id) {
        GeConPortraitRules geConPortraitRules = geConPortraitRulesService.getById(id);
        return CommonResult.success("查询成功",geConPortraitRules);
    }


}
